import request from '@/utils/request'

// 查询records列表
export function listRecords(query) {
  return request({
    url: '/legal/records/list',
    method: 'get',
    params: query
  })
}

// 查询records详细
export function getRecords(categoryName) {
  return request({
    url: '/legal/records/' + categoryName,
    method: 'get'
  })
}

// 新增records
export function addRecords(data) {
  return request({
    url: '/legal/records',
    method: 'post',
    data: data
  })
}

// 修改records
export function updateRecords(data) {
  return request({
    url: '/legal/records',
    method: 'put',
    data: data
  })
}

// 删除records
export function delRecords(categoryName) {
  return request({
    url: '/legal/records/' + categoryName,
    method: 'delete'
  })
}
